package com.sailfish.springbootdemo.dao.db7;

import com.sailfish.springbootdemo.common.DB7TableName;
import com.sailfish.springbootdemo.pojo.db7.UploadVplMeta;
import org.apache.ibatis.annotations.*;

public interface TbUploadVplMetaDao {
    @Insert("INSERT INTO " + DB7TableName.TB_UPLOAD_VPL_META + " (file_name, operator_id, update_time) " +
            "VALUES (#{fileName}, #{operatorId}, {updateTime})")
    @Options(useGeneratedKeys = true, keyProperty = "id")
    int insert(UploadVplMeta meta);

    @Select("SELECT * FROM " + DB7TableName.TB_UPLOAD_VPL_META + " WHERE id = #{id}")
    UploadVplMeta selectById(Integer id);

    @Update("UPDATE " + DB7TableName.TB_UPLOAD_VPL_META + " SET file_name = #{fileName} WHERE id = #{id}")
    int update(UploadVplMeta meta);

    @Delete("DELETE FROM " + DB7TableName.TB_UPLOAD_VPL_META + " WHERE id = #{id}")
    int delete(Integer id);
}
